package com.csun.dsms.service;

import com.csun.dsms.comment.core.support.IService;
import com.csun.dsms.model.domain.DsmsRecord;
import com.csun.dsms.model.domain.DsmsUser;
import com.csun.dsms.model.dto.record.FinishTaskDto;
import com.csun.dsms.model.dto.record.RecordIdsAndEvaluation;
import com.csun.dsms.model.dto.record.RecordPercentDto;
import com.csun.dsms.model.dto.record.RecordQueryDto;
import com.csun.dsms.model.vo.record.ProjectPercentVo;
import com.csun.dsms.model.vo.record.RecordPercentVo;

import java.util.List;

/**
 * @author chisj chisj@foxmail.com
 * @version 1.0.0
 * @date 2021-09-26 11:53
 * @description: TODO
 */
public interface DsmsRecordService extends IService<DsmsRecord> {

    /**
     * 查询服务记录列表 - 分页.
     *
     * @param recordQueryDto    the record query dto
     *
     * @return  the dsms record list.
     */
    List<DsmsRecord> queryListWithPage(RecordQueryDto recordQueryDto);

    /**
     * 自动生成服务记录
     *
     * @return  the int.
     */
    Integer autoCreate(String date);

    /**
     * 完成任务
     *
     * @param finishTaskDto the finish task dto
     * @param login the login user
     *
     * @return  the int.
     */
    Integer finishTask(FinishTaskDto finishTaskDto, DsmsUser login);

    /**
     * 查询服务进度
     *
     * @param recordPercentDto  the record percent dto
     *
     * @return  the record percent vo list.
     */
    List<RecordPercentVo> queryRecordPercent(RecordPercentDto recordPercentDto);

    /**
     * 查询项目进度
     *
     * @param id    the poor id
     * @param date  the date
     *
     * @return  the project percent vo list.
     */
    List<ProjectPercentVo> queryProjectPercent(Long id, String date);

    /**
     * 根据id取消服务任务
     *
     * @param id    the record id
     *
     * @return  the int.
     */
    Integer cancelById(Long id, DsmsUser login);

    /**
     * 更新服务记录特困人员头像照片
     *
     * @param poorId    the poor id
     * @param headPic   the poor head pic
     *
     * @return  the int.
     */
    Integer updatePoorHeadPic(Long poorId, String headPic);
    //查询临时任务
    List<DsmsRecord> queryListByType(RecordQueryDto recordQueryDto);
    //服务评价
    Integer approvalRecordBycompany(RecordIdsAndEvaluation recordIdsAndEvaluation);
    //判断评价的记录是否已完成
    List<DsmsRecord> selectByRecordIds(List<Long> ids);

    Integer queryServices(RecordQueryDto recordQueryDto);
    //点击开始任务
    Integer startTask(FinishTaskDto finishTaskDto, DsmsUser login);
    //任务进行中上传图片
    Integer ongoingTask(FinishTaskDto finishTaskDto, DsmsUser login);
}
